home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-eplain-archive / 000023_adam@symcom.math.uiuc.edu_Thu Aug 11 08:29:00 1994.msg < prev    next >
Internet Message Format  |  1995-01-08  |  3KB

  1. Received: from orion.math.uiuc.edu by cs.umb.edu with SMTP id AA27728
  2.   (5.65c/IDA-1.4.4 for <tex-eplain@cs.umb.edu>); Thu, 11 Aug 1994 14:31:11 -0400
  3. Received: by orion.math.uiuc.edu id AA26341
  4.   (5.67b/IDA-1.4.4 for tex-eplain@cs.umb.edu); Thu, 11 Aug 1994 13:29:00 -0500
  5. Date: Thu, 11 Aug 1994 13:29:00 -0500
  6. From: "Adam H. Lewenberg" <adam@symcom.math.uiuc.edu>
  7. Message-Id: <199408111829.AA26341@orion.math.uiuc.edu>
  8. To: tex-eplain@cs.umb.edu
  9. Subject: margin macros and magnifications: The answer.
  10. Cc: adam@symcom.math.uiuc.edu
  11. Content-Length: 2233
  12.  
  13. About the margin macros...
  14.  
  15. If one has set a magnification other than 1000 (i.e. no magnification), 
  16. the margin macros will _never_ work correctly.* Here are two example
  17. files that show the problem. After the files I give an explanation why
  18. the macros do not work and a simple fix. 
  19.  
  20. %%%%%%%%
  21. % Example 1
  22. \magnification=2000
  23. \input eplain
  24.  
  25. \paperwidth=8.5truein
  26. \leftmargin=2truein    % We want the left margin to be 2 REAL inches
  27.                % from the left (physical edge) of the paper.
  28.  
  29. \parindent=0pt
  30. Hello.
  31. \bye
  32. % Actual left margin (using dvips): 1 inch
  33.  
  34. % Example 2
  35. \magnification=2000
  36. \input eplain
  37.  
  38. \paperwidth=8.5truein
  39. \leftmargin=2in        % We want the left margin to be 2 REAL inches
  40.                % from the left (physical edge) of the paper.
  41.  
  42. \parindent=0pt
  43. Hello.
  44. \bye
  45. % Actual left margin (using dvips):  3 inches
  46.  
  47. %%%%%%%%%%%%
  48.  
  49. Here is what is actually happening.
  50.  
  51. The difference between a dvi file using a \magnification statement and
  52. one that does not is just this: if you use a \magnification command
  53. then in the dvi file appears a parameter for overall document
  54. magnification. This INCLUDES \hoffset and \voffset. This is precisely
  55. why \hoffset nad \voffset are set to 0 initially; if they were not,
  56. then the magnification would move the origin around, but since 0 times
  57. anything is still 0, changing the magnification does not change the
  58. origin. 
  59.  
  60. But if you _do_ want to change the origin, you must realize that the
  61. magnifications affect \hoffset and \voffset. Thus, the safest course
  62. of action when setting page layout parameters is to specify everything
  63. in terms of "true" dimensions. Usually when people want their page
  64. length to be 7 inches long they want it 7 inches regardless of the
  65. magnification. This is why \magnification (defined in PLAIN) ensures
  66. that \hsize and \vsize do not change. 
  67.  
  68. So the fix is: replace those "1in"'s in the margin macros by
  69. "1truein"'s and everything will be fine. I did that, and the above
  70. examples work perfectly. 
  71.  
  72.                       Adam H. Lewenberg
  73.  
  74.  
  75.  
  76.  
  77. * Actually, that is not quite true. They will work ONLY when \leftmargin is
  78. set equal to 1truein. But this is what you get without using
  79. \leftmargin at all. Perhaps that is why nobody noticed that they are
  80. incorrect.